home *** CD-ROM | disk | FTP | other *** search
/ ShareWare OnLine 2 / ShareWare OnLine Volume 2 (CMS Software)(1993).iso / prog / aboutbox.zip / ABOUTDEM.PAS < prev    next >
Pascal/Delphi Source File  |  1993-05-19  |  1KB  |  53 lines

  1. { test of the aboutbox unit }
  2.  
  3. program AboutDemo;
  4.  
  5. uses WInProcs, WinTypes, OWindows, BWCC, AboutBox;
  6.  
  7. {$R ABOUTDEM.RES }
  8.  
  9. const
  10.      cmAbout = 101;
  11.      idBitMap = 200;
  12.  
  13.      CreditText : array[1..7] of pChar =
  14.                   ('',
  15.                    'This is where you would',
  16.                    'put the list of text for',
  17.                    'the programmers and sources',
  18.                    'of the program in question.',
  19.                    '','');
  20.  
  21. type
  22.     pMainWin = ^tMainWin;
  23.     tMainWin = object(tMDIWIndow)
  24.                  procedure cmAbout(var Msg : Tmessage);
  25.                            virtual cm_First + cmAbout;
  26.                end;
  27.  
  28.     tDemoApp = object(TApplication)
  29.                  procedure InitMainWindow; virtual;
  30.                end;
  31.  
  32. procedure tMainWin.cmAbout;
  33.  
  34.   begin
  35.     Application^.Execdialog(new(pAboutBox,Init(@Self,'Demo Box',pChar(idBitmap),CreditText)));
  36.   end;
  37.  
  38. procedure tDemoApp.InitmainWindow;
  39.  
  40.   begin
  41.     MainWindow := new(pMainWin,Init('About Box Demo',LoadMenu(hInstance,'MainMenu')));
  42.   end;
  43.  
  44. var
  45.    TheApp : tDemoApp;
  46.  
  47. begin
  48.   TheApp.Init('Demo');
  49.   TheApp.Run;
  50.   TheApp.Done;
  51. end.
  52.  
  53.